package com.mapper.helping;

import com.domain.IssueComment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 大忽悠
 * @since 2022年02月08日
 */
public interface IssueCommentMapper extends BaseMapper<IssueComment> {

    @Update("UPDATE issue_comment SET like_sum=like_sum+#{num} WHERE id=#{comment_id}")
    int addLikeSum(@Param("comment_id") Integer comment_id,@Param("num")Integer num);

    @Update("UPDATE issue_comment SET is_deleted=1 WHERE id=#{comment_id}")
    Boolean logicDelTargetComment(Integer comment_id);

    @Update("UPDATE issue_comment SET is_audited=1 WHERE id=#{comment_id}")
    Boolean passComment(@Param("comment_id") Integer comment_id);
}
